import Vue from 'vue'
export const  fieldList = [
        {
            label:'考试标题主表',
            type:'text',
            fieldValue:'',
            fieldName:'title',
            fieldType:'text',
            required:true,
            labelWidth: 120,
            tip:'考试的主题，是指你这次考试的主要内容',
        },
        {
            label:'Vant 数字类型',
            textFieldType:'int',
            fieldValue:'',
            fieldName:'title1',
            fieldType:'digit',
            required:true,
            labelWidth: 120,
            tip:'Vant 是一个轻量、可定制的移动端组件库,于 2017 年开源。 目前Vant 官方提供了Vue 2 版本、Vue 3 版本和微信小程序版本,并由社区团队维护React 版本和支付宝小程序版本',
            tipLocation:'bottom'
        },
        {
            label:'Money类型',
            textFieldType:'',
            fieldValue:'',
            fieldName:'money',
            fieldType:'amount',
            required:true,
            labelWidth: 120,
            tip:'请输入具体金额，精度为两位小数，货币为人民币'
        },
        {
            label:'Number类型',
            textFieldType:'number',
            fieldValue:'',
            fieldName:'number',
            fieldType:'number',
            required:true,
            precision:1
        },
        {
            label:'考试标题备份',
            type:'text',
            fieldValue:'Copy',
            fieldName:'titleCopy',
            fieldType:'text',
            required:true
        },
        {
            label:'考试类型',
            fieldType:'select',
            fieldName: 'type',
            required: false,
            postUrl:'/dict/examType',
            getType:'url',
            refreshWhenClick: true
        },
        {
            label:'考试节奏',
            fieldType:'select',
            fieldName: 'type11',
            required: false,
            getType:'url',
            refreshWhenClick: true,
            httpFunction:async ()=>{
            const resp =  await Vue.prototype.$post('/dict/examType1')
            return resp.data.list
        }
},
{
    label:'考试地点',
        fieldType: 'address',
    fieldName: 'address',
    required: false,
    selectLevel:3,
    showProvinceName: true
},
{
    label:'考试科目',
        fieldName:'kemu',
    formSlot:true,
    required: true
},
{
    label:'考试日期',
    fieldType:'date',
    fieldName: 'date',
    fieldValue: '',
    required: true,
    tip:'考试日期前往别迟到',
    displayFormat:'YYYY/MM/DD'
},
{
    label:'考试日期和时间',
    fieldType:'datetime',
    fieldName: 'datetime',
    fieldValue: '',
    required: true,
    labelWidth: 100,
    displayFormat:'YYYY/MM/DD HH:mm'

},
{
    label:'考试时间Time',
        fieldType:'time',
    fieldName: 'time',
    fieldValue: '',
    required: true
},
{
    label:'远程搜索方式',
    fieldType:'tree',
    fieldName: 'tree',
    fieldValue: '',
    required: true,
    postUrl: '/dict/remoteSearch',
    config:{
        configName:'',
        showName:true
    },
    useItemSlot:true
},
{
    label:'远程搜索刷新',
        fieldType:'tree',
    fieldName: 'tree1',
    fieldValue: '',
    required: true,
    postUrl: '/dict/remoteSearch',
    config:{
    configName:'',
        showName:true
},
    useItemSlot:true,
        refreshWhenClick:true,//每次都刷新数据
    tip:'远程搜索就是从网络上加载数据来选择的意思',
    tipLocation: 'bottom'
},
{
    label:'收款人信息',
        fieldType:'fieldCrud',
    fieldName: 'crud',
    fieldValue: [],
    required: true,
    crudViewSlot:false,
    crudEditFunc:'',
    showMoney:true,
    typeList:[
    {
        name:'类型一',
        code:'code1'
    },
],
    typeSecondModuleList:[
    {
        type:'reimbType',
        name:'类型1',
        code:'code1',
        moduleList:[
            {
                label:'考试标题',
                type:'text',
                fieldValue:'',
                fieldName:'title',
                fieldType:'text',
                required:true,
                config:{}
            },
            {
                label:'考试标题备份',
                type:'text',
                fieldValue:'Copy',
                fieldName:'titleCopy',
                fieldType:'text',
                required:true,
                config:{}
            },
            {
                label:'考试类型',
                fieldType:'select',
                fieldName: 'type',
                required: false,
                config:{},
                optionCodes:[
                    {
                        name:'英语',
                        code:'yingyu'
                    },
                    {
                        name:'法语',
                        code:'fayu'
                    }
                ]
            },
            {
                label:'考试费用',
                fieldValue:'',
                fieldName:'examAmount',
                fieldType:'amount',
                required:true,
                isSum:true,
                config:{}
            },
            {
                label:'考试类型1',
                fieldType:'select',
                fieldName: 'type1',
                required: false,
                config:{},
                optionCodes:[
                    {
                        name:'英语',
                        code:'yingyu'
                    },
                    {
                        name:'法语',
                        code:'fayu'
                    }
                ]
            },
        ]
    }
],
    typeSecondEditPageList:[
    {
        type:'reimbType',
        code:'code1',
        name:'类型一',
        list:[
            [
                {
                    label:'考试标题',
                    type:'text',
                    fieldValue:'',
                    fieldName:'title',
                    fieldType:'text',
                    required:true,
                    config:{}
                },
                {
                    label:'考试标题备份',
                    type:'text',
                    fieldValue:'Copy',
                    fieldName:'titleCopy',
                    fieldType:'text',
                    required:true,
                    config:{}
                },
                {
                    label:'考试类型',
                    fieldType:'select',
                    fieldName: 'type',
                    required: false,
                    config:{},
                    optionCodes:[
                        {
                            name:'英语',
                            code:'yingyu'
                        },
                        {
                            name:'法语',
                            code:'fayu'
                        }
                    ]
                },
            ]
        ]
    }
],
    typeSecondShowPageList:[
    // {
    //   type:'reimbType',
    //   code:'code1',
    //   name:'类型一',
    //   list:[
    //     [
    //       {
    //         label:'考试标题',
    //         type:'text',
    //         fieldValue:'',
    //         fieldName:'title',
    //         fieldType:'text',
    //         required:true,
    //         config:{}
    //       },
    //       {
    //         label:'考试标题备份',
    //         type:'text',
    //         fieldValue:'Copy',
    //         fieldName:'titleCopy',
    //         fieldType:'text',
    //         required:true,
    //         config:{}
    //       },
    //       {
    //         label:'考试类型',
    //         fieldType:'select',
    //         fieldName: 'type',
    //         required: false,
    //         config:{},
    //         optionCodes:[
    //           {
    //             name:'英语',
    //             code:'yingyu'
    //           },
    //           {
    //             name:'法语',
    //             code:'fayu'
    //           }
    //         ]
    //       },
    //     ]
    //   ]
    // }
],
    config:{
    configName:'',
        showName:true
}
},
{
    label:'考试结束时间Time',
        fieldType:'time',
    fieldName: 'endTime',
    fieldValue: '',
    required: true,
    labelWidth:150
},
{
    label:'项目信息',
        fieldType:'fieldCrud',
    fieldName: 'projectCrud',
    fieldValue: [],
    required: true,
    crudViewSlot:false,
    crudEditFunc:'',
    showMoney:true,
    typeList:[
    {
        name:'类型一',
        code:'type1'
    },
],
    typeSecondModuleList:[
    {
        type:'reimbType',
        name:'类型1',
        code:'type1',
        moduleList:[
            {
                label:'项目名称',
                type:'text',
                fieldValue:'',
                fieldName:'title',
                fieldType:'text',
                required:true,
                config:{}
            },
            {
                label:'项目类型',
                fieldType:'select',
                fieldName: 'type',
                required: false,
                config:{},
                optionCodes:[
                    {
                        name:'外部项目',
                        code:'yingyu'
                    },
                    {
                        name:'内部项目',
                        code:'fayu'
                    }
                ]
            },
            {
                label:'项目预算',
                fieldValue:'',
                fieldName:'examAmount',
                fieldType:'amount',
                required:true,
                isSum:true,
                config:{}
            },
        ]
    }
],
    typeSecondShowPageList:[
],
    config:{
    configName:'',
        showName:true
}
},
]
export const  fieldListLabelTop = [
    {
        label:'考试标题主表',
        type:'text',
        fieldValue:'',
        fieldName:'title',
        fieldType:'text',
        required:true,
        labelWidth: 120,
        tip:'考试的主题，是指你这次考试的主要内容',
        labelAlign:'top',
        inputAlign:'left',
        errorMessageAlign:'left',

    },
    {
        label:'Vant 数字类型',
        textFieldType:'int',
        fieldValue:'',
        fieldName:'title1',
        fieldType:'digit',
        required:true,
        labelWidth: 120,
        tip:'Vant 是一个轻量、可定制的移动端组件库,于 2017 年开源。 目前Vant 官方提供了Vue 2 版本、Vue 3 版本和微信小程序版本,并由社区团队维护React 版本和支付宝小程序版本',
        tipLocation:'bottom',
        labelAlign:'top',
        inputAlign:'left',
        errorMessageAlign:'left',

    },
    {
        label:'Money类型',
        textFieldType:'',
        fieldValue:'',
        fieldName:'money',
        fieldType:'amount',
        required:true,
        labelWidth: 120,
        tip:'请输入具体金额，精度为两位小数，货币为人民币',
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'Number类型',
        textFieldType:'number',
        fieldValue:'',
        fieldName:'number',
        fieldType:'number',
        required:true,
        precision:1,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'考试标题备份',
        type:'text',
        fieldValue:'Copy',
        fieldName:'titleCopy',
        fieldType:'text',
        required:true,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'考试类型',
        fieldType:'select',
        fieldName: 'type',
        required: false,
        postUrl:'/dict/examType',
        getType:'url',
        refreshWhenClick: true,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'考试节奏',
        fieldType:'select',
        fieldName: 'type11',
        required: false,
        getType:'url',
        refreshWhenClick: true,
        httpFunction:async ()=>{
            const resp =  await Vue.prototype.$post('/dict/examType1')
            return resp.data.list
        },
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'考试地点',
        fieldType: 'address',
        fieldName: 'address',
        required: false,
        selectLevel:3,
        showProvinceName: true,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'考试科目',
        fieldName:'kemu',
        formSlot:true,
        required: true,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'考试日期',
        fieldType:'date',
        fieldName: 'date',
        fieldValue: '',
        required: true,
        tip:'考试日期前往别迟到',
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'考试日期和时间',
        fieldType:'datetime',
        fieldName: 'datetime',
        fieldValue: '',
        required: true,
        labelWidth: 100,
        labelAlign:'top',
        inputAlign:'left',
        displayFormat:'yyyy-MM-dd HH:mm'
    },
    {
        label:'考试时间Time',
        fieldType:'time',
        fieldName: 'time',
        fieldValue: '',
        required: true,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'远程搜索方式',
        fieldType:'tree',
        fieldName: 'tree',
        fieldValue: '',
        required: true,
        postUrl: '/dict/remoteSearch',
        config:{
            configName:'',
            showName:true
        },
        useItemSlot:true,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'远程搜索刷新',
        fieldType:'tree',
        fieldName: 'tree1',
        fieldValue: '',
        required: true,
        postUrl: '/dict/remoteSearch',
        config:{
            configName:'',
            showName:true
        },
        useItemSlot:true,
        refreshWhenClick:true,//每次都刷新数据
        tip:'远程搜索就是从网络上加载数据来选择的意思',
        tipLocation: 'bottom',
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'收款人信息',
        fieldType:'fieldCrud',
        fieldName: 'crud',
        fieldValue: [],
        required: true,
        crudViewSlot:false,
        crudEditFunc:'',
        showMoney:true,
        errorMessageAlign: 'left',
        typeList:[
            {
                name:'类型一',
                code:'code1'
            },
        ],
        typeSecondModuleList:[
            {
                type:'reimbType',
                name:'类型1',
                code:'code1',
                moduleList:[
                    {
                        label:'考试标题',
                        type:'text',
                        fieldValue:'',
                        fieldName:'title',
                        fieldType:'text',
                        required:true,
                        config:{}
                    },
                    {
                        label:'考试标题备份',
                        type:'text',
                        fieldValue:'Copy',
                        fieldName:'titleCopy',
                        fieldType:'text',
                        required:true,
                        config:{}
                    },
                    {
                        label:'考试类型',
                        fieldType:'select',
                        fieldName: 'type',
                        required: false,
                        config:{},
                        optionCodes:[
                            {
                                name:'英语',
                                code:'yingyu'
                            },
                            {
                                name:'法语',
                                code:'fayu'
                            }
                        ]
                    },
                    {
                        label:'考试费用',
                        fieldValue:'',
                        fieldName:'examAmount',
                        fieldType:'amount',
                        required:true,
                        isSum:true,
                        config:{}
                    },
                    {
                        label:'考试类型1',
                        fieldType:'select',
                        fieldName: 'type1',
                        required: false,
                        config:{},
                        optionCodes:[
                            {
                                name:'英语',
                                code:'yingyu'
                            },
                            {
                                name:'法语',
                                code:'fayu'
                            }
                        ]
                    },
                ]
            }
        ],
        typeSecondEditPageList:[
            {
                type:'reimbType',
                code:'code1',
                name:'类型一',
                list:[
                    [
                        {
                            label:'考试标题',
                            type:'text',
                            fieldValue:'',
                            fieldName:'title',
                            fieldType:'text',
                            required:true,
                            config:{}
                        },
                        {
                            label:'考试标题备份',
                            type:'text',
                            fieldValue:'Copy',
                            fieldName:'titleCopy',
                            fieldType:'text',
                            required:true,
                            config:{}
                        },
                        {
                            label:'考试类型',
                            fieldType:'select',
                            fieldName: 'type',
                            required: false,
                            config:{},
                            optionCodes:[
                                {
                                    name:'英语',
                                    code:'yingyu'
                                },
                                {
                                    name:'法语',
                                    code:'fayu'
                                }
                            ]
                        },
                    ]
                ]
            }
        ],
        typeSecondShowPageList:[
            // {
            //   type:'reimbType',
            //   code:'code1',
            //   name:'类型一',
            //   list:[
            //     [
            //       {
            //         label:'考试标题',
            //         type:'text',
            //         fieldValue:'',
            //         fieldName:'title',
            //         fieldType:'text',
            //         required:true,
            //         config:{}
            //       },
            //       {
            //         label:'考试标题备份',
            //         type:'text',
            //         fieldValue:'Copy',
            //         fieldName:'titleCopy',
            //         fieldType:'text',
            //         required:true,
            //         config:{}
            //       },
            //       {
            //         label:'考试类型',
            //         fieldType:'select',
            //         fieldName: 'type',
            //         required: false,
            //         config:{},
            //         optionCodes:[
            //           {
            //             name:'英语',
            //             code:'yingyu'
            //           },
            //           {
            //             name:'法语',
            //             code:'fayu'
            //           }
            //         ]
            //       },
            //     ]
            //   ]
            // }
        ],
        config:{
            configName:'',
            showName:true
        }
    },
    {
        label:'考试结束时间Time',
        fieldType:'time',
        fieldName: 'endTime',
        fieldValue: '',
        required: true,
        labelWidth:150,
        labelAlign:'top',
        inputAlign:'left'
    },
    {
        label:'项目信息',
        fieldType:'fieldCrud',
        fieldName: 'projectCrud',
        fieldValue: [],
        required: true,
        crudViewSlot:false,
        crudEditFunc:'',
        showMoney:true,
        typeList:[
            {
                name:'类型一',
                code:'type1'
            },
        ],
        typeSecondModuleList:[
            {
                type:'reimbType',
                name:'类型1',
                code:'type1',
                moduleList:[
                    {
                        label:'项目名称',
                        type:'text',
                        fieldValue:'',
                        fieldName:'title',
                        fieldType:'text',
                        required:true,
                        config:{}
                    },
                    {
                        label:'项目类型',
                        fieldType:'select',
                        fieldName: 'type',
                        required: false,
                        config:{},
                        optionCodes:[
                            {
                                name:'外部项目',
                                code:'yingyu'
                            },
                            {
                                name:'内部项目',
                                code:'fayu'
                            }
                        ]
                    },
                    {
                        label:'项目预算',
                        fieldValue:'',
                        fieldName:'examAmount',
                        fieldType:'amount',
                        required:true,
                        isSum:true,
                        config:{}
                    },
                ]
            }
        ],
        typeSecondShowPageList:[
        ],
        config:{
            configName:'',
            showName:true
        }
    },
]

//FieldSelect字段使用演示
export const fieldSelectList = [
    {
        fieldType:'select',
        fieldName:'s1',
        label:'Get请求',
        methodType:'get',
        postUrl:'/dict/getSelectList',
        getType:'url',
        tip:'演示GET请求配置',
        tipLocation:'bottom',
        required:false
    },
    {
        fieldType:'select',
        fieldName:'s1',
        label:'Post请求',
        methodType:'post',
        postUrl:'/dict/postSelectList',
        getType:'url',
        tip:'演示POST请求配置',
        tipLocation:'bottom',
        required: false
    }
]

//FieldCheckBoxSelect
export const fieldCheckBoxSelectList = [
    {
        label:'post搜索',
        fieldType:'tree',
        fieldName: 'tree',
        fieldValue: '',
        required: true,
        methodType:'post',
        postUrl: '/dict/remoteSearch',
        config:{
            configName:'',
            showName:true
        },
        useItemSlot:true
    },
]
